Skip to content

feat(system): detect ubuntu/debian derivative distros via id_like fallback#327

Open
s3bc40 wants to merge 2 commits intoCodSpeedHQ:mainfrom
s3bc40:feat/linux-distro-id-like-fallback
Open

feat(system): detect ubuntu/debian derivative distros via id_like fallback#327
s3bc40 wants to merge 2 commits intoCodSpeedHQ:mainfrom
s3bc40:feat/linux-distro-id-like-fallback

Conversation

@s3bc40
Copy link
Copy Markdown

@s3bc40 s3bc40 commented Apr 30, 2026

Closes #326

Summary

  • Upgrade sysinfo to 0.38.4 to access System::distribution_id_like()
  • Add LinuxDistribution::from_id_like() which falls back to the ID_LIKE parent chain when the primary distro ID is unrecognized
  • Adapt System::physical_core_count() call site in system/info.rs (became an associated function in 0.38)

Test plan

  • pop_os_resolves_to_ubuntu_via_id_like — primary fix case
  • ubuntu_resolves_directly_without_id_like — existing behavior unchanged
  • centos_with_unrecognized_parents_is_other — unrecognized lineage stays Other
  • All existing tests pass

ofc if it does not comply with your needs, you can close the PR 👍

s3bc40 added 2 commits April 30, 2026 19:07
Required to access `System::distribution_id_like()`, which exposes the
`ID_LIKE` field from `/etc/os-release` and enables detecting Ubuntu/Debian
derivative distributions.

`System::physical_core_count()` became an associated function in this
version — adapted call site in `system/info.rs` accordingly.
…lback

Add `from_id_like()` to fall back to the `ID_LIKE` parent chain when the
primary distro ID is unrecognized. Fixes valgrind setup failing on Pop!_OS
(`ID=pop`, `ID_LIKE="ubuntu debian"`). Tests also cover Ubuntu and CentOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Valgrind setup fails on Ubuntu/Debian derivative distributions (e.g. Pop!_OS)

1 participant